﻿//初始化入口
$(function() {
    $('#dlgresult-addData').dialog('close');
    if (reportId) {
        $('#btn_searchReport').linkbutton('enable');
    } else {
        $('#btn_searchReport').linkbutton('disable');
    }
});


//报表查询
function onStartSearchData() {

    requestAjax('Controller.aspx?controller=ReportController&method=LoadPageReportSearch&titleId=' + reportId, {}, function(data) {
        $('#addDataDiv').empty();
        $('#addDataDiv').load("ReportSearchdlg.aspx", {}, function() {
            $.parser.parse($('#addDataDiv'));
        });
    });
    $('#dlgresult-addData').dialog('open');

}

//报表查询确定
function dlgsearch_reportOk() {
    FormSubmit($('#formreportsearch'), 'Controller.aspx?controller=ReportController&method=ExecProcedure&titleId=' + reportId, function() {
        $('#dlgresult-addData').dialog('close');
        printDivPreview($('#printDiv'));
    });
}